#include "networkconnectionjsonrequest.h"
#include <json.h>

#include <QVariantMap>
#include <QDebug>


namespace Network {

ConnectionJSONRequest::ConnectionJSONRequest(QObject *parent) :
    Network::ConnectionRequest(parent)
{
}


QByteArray ConnectionJSONRequest::content() const
{
    JsonWriter writer;
    QVariantMap map;
    map.insert("cmd", commandId());
    map.insert("data", data());
    QString data = writer.toString(map);

    // qDebug() << "Content Connection Request:";
     qDebug() << data;
    return data.toUtf8();
}

} // namespace Network
